﻿using ReflectionStudio.Components.UserControls;
using ReflectionStudio.Core.Events;
using System;
using System.ComponentModel;
using System.Data;
using System.Windows;
using System.Windows.Controls;
using System.Windows.Media;
namespace WPFExcelReport
{
    public partial class MainWindow : DocumentBase
    {
        ViewModelBase vm;
        public MainWindow()
        {
            vm = new ViewModelBase();
            DataContext = vm;
            InitializeComponent();
            Name = "发票管理";
        }
        ViewBase ui;
        MessageInfo msg;
        public override void OnWorkflowIDChange(MessageEventArgs e)
        {
            base.OnWorkflowIDChange(e);
            msg = e.Info;
            string wfid = msg.Details;
            MainTab.Children.Clear();
            switch (wfid)
            {
                case "VR02":
                    ui = new TVRKOPF();
                    MainTab.Children.Add(ui);
                    ((TVRKOPF)ui).IsCanPay = false;
                    ((TVRKOPF)ui).VKP = msg.ORDER;
                    break;
                case "EKVR02":
                    ui = new TEKVR02();
                    MainTab.Children.Add(ui);
                    ((TEKVR02)ui).IsCanPay = false;
                    ((TEKVR02)ui).VKP = msg.ORDER;
                    break;

            }
        }

        public override void Window_Loaded(object sender, RoutedEventArgs e)
        {

        }

    }
}
